The present disclosure relates to coverage analysis of computer programs in general, and to code coverage analysis of source code in particular.
Computerized devices control almost every aspect of our life—from writing documents to controlling traffic lights. However, computerized devices are bug-prone, and thus require a testing phase in which the bugs should be discovered. The testing phase is considered one of the most difficult tasks in developing a computerized device. Many developers of computerized devices devote a significant portion, such as 70%, of the development cycle to discover erroneous behaviors of the software employing the computerized device.
In order to determine that a testing phase is of a relatively high quality, coverage analysis may be utilized. By analyzing coverage of tests in respect to coverage tasks, a developer may be informed which aspects of the software have been tested and which aspects have not been operated by the tests. Various different coverage metrics may be employed, such as for example, code coverage metrics and data coverage metrics. Code coverage metrics are associated with portions of the software, and are indicative of operation of specific portions of the code, such as for example, execution of a line, a function, a code of a file, a code of a file in a directory, a code associated with an object, a code associated with a method of an object or the like.
The developer or any other user interested in testing the software, such as for example a member of a Quality Assurance (QA) team, may utilize a coverage metric to determine which aspects of the software have been tested sufficiently and which aspects have not.